<?php if (!defined('THINK_PATH')) exit();?>

<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="__TMPL__Common/style/style.css" />
<script type="text/javascript" src="__TMPL__Common/js/check_dog.js"></script>
<script type="text/javascript" src="__TMPL__Common/js/IA300ClientJavascript.js"></script>
<script type="text/javascript">
	var ACTION_ID ='<?php echo $action_id ?>';
 	var VAR_MODULE = "<?php echo conf("VAR_MODULE");?>";
	var VAR_ACTION = "<?php echo conf("VAR_ACTION");?>";
	var MODULE_NAME	=	'<?php echo MODULE_NAME; ?>';
	var ACTION_NAME	=	'<?php echo ACTION_NAME; ?>';
	var ROOT = '__APP__';
	var ROOT_PATH = '<?php echo APP_ROOT; ?>';
	var CURRENT_URL = '<?php echo trim($_SERVER['REQUEST_URI']);?>';
	var INPUT_KEY_PLEASE = "<?php echo L("INPUT_KEY_PLEASE");?>";
	var TMPL = '__TMPL__';
	var APP_ROOT = '<?php echo APP_ROOT; ?>';
	var LOGINOUT_URL = '<?php echo u("Public/do_loginout");?>';
	var WEB_SESSION_ID = '<?php echo es_session::id(); ?>';
	var EMOT_URL = '<?php echo APP_ROOT; ?>/public/emoticons/';
	var MAX_FILE_SIZE = "<?php echo (app_conf("MAX_IMAGE_SIZE")/1000000)."MB"; ?>";
	var FILE_UPLOAD_URL ='<?php echo u("File/do_upload");?>' ;
	CHECK_DOG_HASH = '<?php $adm_session = es_session::get(md5(conf("AUTH_KEY"))); echo $adm_session["adm_dog_key"]; ?>';
	function check_dog_sender_fun()
	{
		window.clearInterval(check_dog_sender);
		check_dog2();
	}
	var check_dog_sender = window.setInterval("check_dog_sender_fun()",5000);
	
</script>
	<script type="text/javascript" src="__TMPL__Common/js/cropper/jquery.min.js"></script>
<script type="text/javascript" src="__TMPL__Common/js/jquery.timer.js"></script>

<link rel="stylesheet" type="text/css" href="__TMPL__Common/style/weebox.css" />
<script type="text/javascript" src="__TMPL__Common/js/jquery.bgiframe.js"></script>
<script type="text/javascript" src="__TMPL__Common/js/jquery.weebox.js"></script>
<link rel="stylesheet" type="text/css" href="__TMPL__Common/js/cropper/cropper.min.css" />
<link rel="stylesheet" type="text/css" href="__TMPL__Common/js/cropper/main.css" />
<script type="text/javascript" src="__TMPL__Common/js/cropper/cropper.min.js"></script>

<script type="text/javascript" src="__TMPL__Common/js/script.js"></script>
<script type="text/javascript" src="__ROOT__/public/runtime/admin/lang.js"></script>
<script type='text/javascript'  src='__ROOT__/admin/public/kindeditor/kindeditor.js'></script>
<script type='text/javascript'  src='__ROOT__/admin/public/kindeditor/lang/zh_CN.js'></script>


</head>
<body onLoad="javascript:DogPageLoad();">
<div id="info"></div>

<div class="main">
<div class="main_title"><?php echo L("EDIT");?> <a href="<?php echo u("Games/index");?>" class="back_list"><?php echo L("BACK_LIST");?></a></div>
<div class="blank5"></div>
<form name="edit" action="__APP__" method="post" enctype="multipart/form-data">
<table class="form" cellpadding=0 cellspacing=0>
	<tr>
		<td colspan=2 class="topTd"></td>
	</tr>
    <tr>
        <td class="item_title">游戏名称:</td>
        <td class="item_input"><input type="text" class="textbox require" name="name" value="<?php echo ($vo["name"]); ?>"/></td>
    </tr>
    <tr>
        <td class="item_title">游戏图标:</td>
        <td class="item_input"><span>
        <div style='float:left; height:35px; padding-top:1px;'>
            <input type='hidden' value='<?php echo ($vo["image"]); ?>' name='image' id='keimg_h_image' />
            <div class='buttonActive' style='margin-right:5px;'>
                <div class='buttonContent'>
                    <button type='button' class='keimg ke-icon-upload_image' rel='image'>选择图片</button>
                </div>
            </div>
        </div>
         <a href='<?php if($vo["image"] == ''): ?>./admin/Tpl/default/Common/images/no_pic.gif<?php else: ?><?php echo ($vo["image"]); ?><?php endif; ?>' target='_blank' id='keimg_a_image' ><img src='<?php if($vo["image"] == ''): ?>./admin/Tpl/default/Common/images/no_pic.gif<?php else: ?><?php echo ($vo["image"]); ?><?php endif; ?>' id='keimg_m_image' width=35 height=35 style='float:left; border:#ccc solid 1px; margin-left:5px;' /></a>
         <div style='float:left; height:35px; padding-top:1px;'>
             <div class='buttonActive'>
                <div class='buttonContent'>
                    <img src='/admin/Tpl/default/Common/images/del.gif' style='<?php if($vo["image"] == ''): ?>display:none<?php endif; ?>; margin-left:10px; float:left; border:#ccc solid 1px; width:35px; height:35px; cursor:pointer;' class='keimg_d' rel='image' title='删除'>
                </div>
            </div>
        </div>
        </span>
            <span class='tip_span'>&nbsp;[图标规格为：35px*35px]</span>
        </td>
    </tr>
    <?php if($banker == 1): ?><tr>
            <td class="item_title">玩家上庄底金:</td>
            <td class="item_input">
                <input type="number" class="textbox" name="principal" value="<?php echo ($vo["principal"]); ?>" min="0"/>
                <span class="tip_span">&nbsp;玩家上庄底金</span>
            </td>
        </tr><?php endif; ?>
    <?php if(is_array($op)): foreach($op as $key=>$v): ?><tr>
            <td class="item_title">下注选项<?php echo ($key); ?>倍率:</td>
            <td class="item_input">
                <input type="number" class="textbox" name="option[]" value="<?php echo ($v); ?>" min="1" max="99" step="0.1" />
                <span class="tip_span">&nbsp;中奖倍率，范围1-99</span>
            </td>
        </tr><?php endforeach; endif; ?>
    <tr>
        <td class="item_title">佣金比率:</td>
        <td class="item_input">
            <input type="number" class="textbox" name="commission_rate" value="<?php echo ($vo["commission_rate"]); ?>" min="0" max="100" />
            <span class="tip_span">&nbsp;主播佣金比例：50表示收益的50%为佣金；收益金额=总金额-中奖返还</span>
        </td>
    </tr>
    <?php if($diamond_game == 1): ?><tr>
        <td class="item_title">主播收益印票转化率:</td>
        <td class="item_input">
            <input type="number" class="textbox" name="ticket_rate" value="<?php echo ($vo["ticket_rate"]); ?>" min="0" max="100"/>
            <span class="tip_span">&nbsp;主播收益印票转化率：主播佣金转化为印票结算的转化率</span>
        </td>
    </tr><?php endif; ?>
    <tr>
        <td class="item_title">游戏时长:</td>
        <td class="item_input">
            <input type="number" class="textbox" name="long_time" value="<?php echo ($vo["long_time"]); ?>" min="20" max="99" />
            <span class="tip_span">&nbsp;当轮时长，单位s，范围20-99</span>
        </td>
    </tr>
    <tr>
        <td class="item_title">干预系数:</td>
        <td class="item_input">
            <input type="number" class="textbox" name="rate" value="<?php echo ($vo["rate"]); ?>" min="0" max="100"/>
            <span class="tip_span">&nbsp;干预系数，0-100,0表示无干预，全部随机结果、100表示完全干预，收益最大</span>
        </td>
    </tr>
    <tr>
        <td class="item_title">游戏描述:</td>
        <td class="item_input"><input type="text" class="textbox" name="description" value="<?php echo ($vo["description"]); ?>"/></td>
    </tr>
	<tr>
		<td class="item_title"></td>
		<td class="item_input">
			<!--隐藏元素-->
			<input type="hidden" name="<?php echo conf("VAR_MODULE");?>" value="Games" />
			<input type="hidden" name="<?php echo conf("VAR_ACTION");?>" value="update" />
			<input type="hidden" name="id" value="<?php echo ($vo["id"]); ?>" />
			<!--隐藏元素-->
			<input type="submit" class="button" value="<?php echo L("EDIT");?>" />
			<input type="reset" class="button" value="<?php echo L("RESET");?>" />
		</td>
	</tr>
	<!--<tr>-->
		<!--<td colspan=2 class="bottomTd"></td>-->
	<!--</tr>-->
</table>

</form>
</div>
</body>
</html>